<template>
    <div class="container">
        <navbar class="navbarb"> 
            <navbar-item type="back"></navbar-item>   
            <navbar-item type="title">
                <text class="headtext">个人信息管理</text>
            </navbar-item>
        </navbar>
        
        <scroller class="tablelist" :show-scrollbar="false">
        <div class="cell_list_box">
            <wxc-cell title="头像"
                :has-arrow="true"
                @wxcCellClicked="wxcCellClickedpiture"
                :has-top-border="false">
                <image class="avator" src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1578919147335&di=98d99d2afe0eca418b88c35fe2c36229&imgtype=0&src=http%3A%2F%2Fpic4.zhimg.com%2F50%2Fv2-848b1a190d937e270e8d062d00865493_hd.jpg" style="width:142px;height:142px"></image>
            </wxc-cell>
        <wxc-cell title="用户名"
                :has-arrow="true"
                @wxcCellClicked="wxcCellClicked"
                :has-margin="true"
                :has-top-border="false">
                <text class="righttext">频道助手</text>
            </wxc-cell>
            <wxc-cell title="姓名"
                :has-arrow="true"
                @wxcCellClicked="wxcCellClicked"
                :has-top-border="false">
                <text class="righttext">王娜娜</text>
            </wxc-cell>
            <wxc-cell title="性别"
                :has-arrow="true"
                @wxcCellClicked="wxcCellClicked"
                :has-top-border="false">
                <text class="righttext">男</text>
            </wxc-cell>
            <wxc-cell title="身份"
                :has-arrow="true"
                @wxcCellClicked="wxcCellClicked"
                :has-margin="true"
                :has-top-border="false">
                <text class="righttext">教师</text>
            </wxc-cell>
            <wxc-cell title="手机号"
                :has-arrow="true"
                @wxcCellClicked="wxcCellClicked"
                :has-top-border="false">
                <text class="righttext">15362234001</text>
            </wxc-cell>
            <wxc-cell title="邮箱"
                :has-arrow="true"
                @wxcCellClicked="wxcCellClicked"
                :has-margin="true"
                :has-top-border="false">
                <text class="righttext">678343422@qq.com</text>
            </wxc-cell>
            <wxc-cell title="单位"
                :has-arrow="true"
                @wxcCellClicked="wxcCellClicked"
                :has-top-border="false">
                <text class="righttext">华北电力大学(北京)</text>
            </wxc-cell>
            <wxc-cell title="工号"
                :has-arrow="true"
                @wxcCellClicked="wxcCellClicked"
                :has-top-border="false">
                <text class="righttext">223444</text>
            </wxc-cell>

            <wxc-cell title="登录"
                :has-arrow="true"
                @wxcCellClicked="loginpage"
                :has-top-border="false">
                <text class="righttext">登录帐号</text>
            </wxc-cell>
        </div>
        
        
         
                
        </scroller>



    </div>
</template>
<script>
    import { WxcCell } from 'weex-ui';
    const picture = app.requireModule('picture');
    const eeui = app.requireModule('eeui');
     export default {
         components:{WxcCell},
         data(){
             return{
                 refreshing: false,
                loadinging: false,
             }
         },
         methods: {
            wxcCellClickedpiture (e) {
                picture.create({
                    gallery: 1
                }, function(result) {
                    //......
                    var obj = {
                        pageName: '页面名称',
                        status: 'success',   //状态，详见：注①
                        
                        //status=success
                        lists: [{
                            path:'...',         //为原图path
                            cutPath:'...',      //为裁剪后path，需判断isCut是否为true
                            compressPath:'...', //为压缩后path，需判断compressed是否为true
                            // 如果裁剪并压缩了，以取压缩路径为准，因为是先裁剪后压缩的
                            
                            isCut: true,        //是否裁剪
                            compressed: true,   //是否压缩
                            mimeType: 1,        //mime类型
                        }]
                    }



                
                });
            },
            wxcCellClicked (e) {
                
            },
            onrefresh (event) {
              
                this.refreshing = true
                setTimeout(() => {
                this.refreshing = false
                }, 0)
            },
            onloading (event) {
                //modal.toast({ message: 'Loading', duration: 1 })
                this.loadinging = true
                setTimeout(() => {
                this.loadinging = false
                }, 0)
            },
            loginpage(){
                eeui.openPage({
                    url: '../loginPage/loginpage.js',
                    statusBarColor:'#1eb76e',
                    animated:false
                }, function(result) {
                    //......
                }); 
            },
            back(){
               eeui.openPage({
                    url: 'userInfoPage.js',
                    animated:false,
                    params:{curindex:2}
                }, function(result) {
                    //......
                });  
            }
        }
     }
</script>
<style scoped>
.container{
    background-color:#ebebeb;
    
    /* margin-bottom:200px; */
}
.tablelist{
    /* height:2000; */
}
.cell_list_box{
    height:1500;
}
.navbarb{
        width: 750px;
        height: 100px;
        background-color: #1eb76e;
    }
.headtext {
        font-size: 30px;
        color: #ffffff;
    }
.righttext{
    margin-right:20px;
    font-size:28;
    color:#999;
}
.avator{
    border-radius:100;
    margin-right:10;
}
.backIcon{
    width: 100px;
    height: 100px;
    color: #ffffff;
}
</style>